package a.j;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

public class pe
  implements md.j_, wb.s_, hg.g_, jd.j_
{
  public static final byte a = 0;
  public static final byte b = 1;
  public static final byte c = 2;
  private final byte d;
  public static boolean e;
  
  public pe(byte paramByte)
  {
    this.d = paramByte;
  }
  
  public Object a(ld paramld1, Object paramObject, ld paramld2)
  {
    return a(paramObject);
  }
  
  protected Object a(Object paramObject)
  {
    boolean bool = ld.E;
    if ((bool) || (paramObject != null))
    {
      try
      {
        if ((bool) || ((paramObject instanceof Cloneable)))
        {
          Class localClass = paramObject.getClass();
          localObject = localClass.getMethod("clone", (Class[])null);
          if ((bool) || (Modifier.isPublic(((Method)localObject).getModifiers()))) {
            return ((Method)localObject).invoke(paramObject, (Object[])null);
          }
        }
      }
      catch (InvocationTargetException localInvocationTargetException)
      {
        Object localObject = localInvocationTargetException.getTargetException();
        if ((bool) || ((localObject instanceof RuntimeException))) {
          throw ((RuntimeException)localObject);
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException) {}catch (IllegalAccessException localIllegalAccessException) {}
      switch (this.d)
      {
      case 2: 
      default: 
        throw new IllegalArgumentException("Cloning failed.");
      case 0: 
        return paramObject;
      }
      return null;
    }
    return null;
  }
  
  public Object a(ld paramld, ObjectInputStream paramObjectInputStream)
    throws IOException
  {
    return a(paramObjectInputStream);
  }
  
  protected Object a(ObjectInputStream paramObjectInputStream)
    throws IOException
  {
    try
    {
      return paramObjectInputStream.readObject();
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      if (this.d == 1) {
        return null;
      }
      throw new IOException(localClassNotFoundException.getMessage());
    }
  }
  
  public void a(ld paramld, Object paramObject, ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    a(paramObject, paramObjectOutputStream);
  }
  
  protected void a(Object paramObject, ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    boolean bool = ld.E;
    if ((bool) || (paramObject != null))
    {
      if (bool) {
        break label42;
      }
      if (!(paramObject instanceof Serializable)) {}
    }
    else
    {
      paramObjectOutputStream.writeObject(paramObject);
      if ((!bool) && (!ld.D)) {
        return;
      }
    }
    label42:
    if (this.d == 2) {
      throw new IOException("Could not write userData.");
    }
    paramObjectOutputStream.writeObject(null);
  }
  
  public void a(tb paramtb, Object paramObject, ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    a(paramObject, paramObjectOutputStream);
  }
  
  public Object a(tb paramtb, ObjectInputStream paramObjectInputStream)
    throws IOException
  {
    return a(paramObjectInputStream);
  }
  
  public Object a(tb paramtb1, Object paramObject, tb paramtb2)
  {
    return a(paramObject);
  }
  
  public void a(hg paramhg, Object paramObject, ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    a(paramObject, paramObjectOutputStream);
  }
  
  public Object a(hg paramhg, ObjectInputStream paramObjectInputStream)
    throws IOException
  {
    return a(paramObjectInputStream);
  }
  
  public Object a(hg paramhg1, Object paramObject, hg paramhg2)
  {
    return a(paramObject);
  }
  
  public Object a(jd paramjd1, Object paramObject, jd paramjd2)
  {
    return a(paramObject);
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.j.pe
 * JD-Core Version:    0.7.0.1
 */